package mediator.improve;

/**
 * 来模拟实现一个发送聊天的功能
 */
public class Client {
    public static void main(String[] args) {
        Mediator mediator = new ChatMediator();
        User user1 = new ChatUser(mediator, "User1");
        User user2 = new ChatUser(mediator, "User2");
        User user3 = new ChatUser(mediator, "User3");

        user1.send("hello");
        System.out.println("=============");
        user2.send("nihao");
        System.out.println("=============");
        user3.send("jiji");
    }
}
